package com.ruoyi.ihome.service.impl;

import com.ruoyi.ihome.domain.ApartmentFacility;
import com.ruoyi.ihome.mapper.ApartmentFacilityMapper;
import com.ruoyi.ihome.service.IApartmentFacilityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 公寓设施Service业务层处理
 * 
 * @author zy
 * @date 2024-08-13
 */
@Service
public class ApartmentFacilityServiceImpl implements IApartmentFacilityService 
{
    @Autowired
    private ApartmentFacilityMapper apartmentFacilityMapper;

    /**
     * 查询公寓设施
     * 
     * @param id 公寓设施主键
     * @return 公寓设施
     */
    @Override
    public ApartmentFacility selectApartmentFacilityById(Long id)
    {
        return apartmentFacilityMapper.selectApartmentFacilityById(id);
    }

    /**
     * 查询公寓设施列表
     * 
     * @param apartmentFacility 公寓设施
     * @return 公寓设施
     */
    @Override
    public List<ApartmentFacility> selectApartmentFacilityList(ApartmentFacility apartmentFacility)
    {
        return apartmentFacilityMapper.selectApartmentFacilityList(apartmentFacility);
    }

    /**
     * 新增公寓设施
     * 
     * @param apartmentFacility 公寓设施
     * @return 结果
     */
    @Override
    public int insertApartmentFacility(ApartmentFacility apartmentFacility)
    {
        return apartmentFacilityMapper.insertApartmentFacility(apartmentFacility);
    }

    /**
     * 修改公寓设施
     * 
     * @param apartmentFacility 公寓设施
     * @return 结果
     */
    @Override
    public int updateApartmentFacility(ApartmentFacility apartmentFacility)
    {
        return apartmentFacilityMapper.updateApartmentFacility(apartmentFacility);
    }

    /**
     * 批量删除公寓设施
     * 
     * @param ids 需要删除的公寓设施主键
     * @return 结果
     */
    @Override
    public int deleteApartmentFacilityByIds(Long[] ids)
    {
        return apartmentFacilityMapper.deleteApartmentFacilityByIds(ids);
    }

    /**
     * 删除公寓设施信息
     * 
     * @param id 公寓设施主键
     * @return 结果
     */
    @Override
    public int deleteApartmentFacilityById(Long id)
    {
        return apartmentFacilityMapper.deleteApartmentFacilityById(id);
    }
}
